<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class VideoTag extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'video_tag';

    /**
     * 复合主键，应该如何定义
     */
//    protected $primaryKey = '';

    public $timestamps = false;

    protected $guarded = [''];

    public function video()
    {
        return $this->belongsTo('App\Models\ActivityProjectVideo', 'video_id', 'id');
    }

    public function tag()
    {
        return $this->belongsTo('App\Models\Tag', 'tag_id', 'id');
    }
}
